New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes the FontSizePicker Custom option #18842
Fixes the FontSizePicker Custom option #18842
Conversation
This commit prevent the "Custom" option still showing up in the font sizes drop down when a WordPress theme uses the `add_theme_support( 'disable-custom-font-sizes' )` feature.
The slider didn't update the select options. In the new `onSliderChangeValue` function, we set the new fontSize state with the props function `onChange` and we also set the selection option given the new font size.
This reverts commit 73f952f. I don't know why Travis doesn't accept this commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this change makes Travis build fail. @ZebulanStanphill ?
They are necessary to update the custom select when the fontsize slider is used.
@JeanDavidDaviet The automated tests haven't been working quite right lately, so the failure may be unrelated. Try recommitting the change. |
This reverts commit aa62643.
@ZebulanStanphill Thanks, that was it ! |
It would be good to add tests for this. |
@epiqueras I won't be home for december, but I sure would like to see the test suite for this feature implemented (or modified) as I'm not a good test writer. |
Fixes #18716
This commit prevent the "Custom" option still showing up in the font sizes drop down when a WordPress theme uses the
add_theme_support( 'disable-custom-font-sizes' )
feature.Description
There was no check on the
disableCustomFontSizes
variable. The custom object{ slug: 'custom', name: __( 'Custom' ) }
was then always added even when not wanted.How has this been tested?
Tested with Storybook and npm test
Types of changes
Bug Fix
Checklist: